home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gwu / cwkblock.c < prev    next >
C/C++ Source or Header  |  1996-01-30  |  2KB  |  49 lines

  1. /*
  2.     GWMON Parallel Ada Monitor for 386/486 PCs   
  3.     Copyright (C) 1993, Charles W. Kann  & Michael Bliss Feldman
  4.                         ckann@seas.gwu.edu mfeldman@seas.gwu.edu
  5.  
  6.     This program is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; either version 2 of the License.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. */
  20.  
  21. #include "ed.h"
  22. #include "keydef.h"
  23.  
  24. void CWK_CREATE_BLOCK(block_no, block_name, block_file)
  25. int block_no;
  26. char *block_name;
  27. char *block_file;
  28. {
  29.     char msg[100];
  30.     int ch;
  31.  
  32.     if ( block_no > MAX_BLKS ) {
  33.     printf("Can't work with more than %d blocks, (%d)...", MAX_BLKS-1,
  34.             block_no);
  35.     }
  36.     /*
  37.     Find the block particulars in the block file (For now, hard code them)
  38.     */
  39.     CWK_BLKS[block_no].TN = malloc( strlen(block_name)+1 );
  40.     strcpy( CWK_BLKS[block_no].TN, block_name );
  41.     CWK_BLKS[block_no].FL = 1;
  42.     CWK_BLKS[block_no].LL = 10000;
  43.     CWK_BLKS[block_no].FLOS = 0;
  44.     CWK_BLKS[block_no].CL = 0;
  45.     CWK_BLKS[block_no].MON = CWK_CREATE_MON_WIN(CWK_BLKS[block_no].TN, 
  46.         (monitor_type == 1) ? 1 : 0 );
  47.         CWK_BLKS[block_no].FD = CWK_LOAD_FILE(block_file);
  48. }
  49.